import router from '../router'
router.beforeEach((to,from,next) => {
    //const userId = localStorage.getItem("userId");
    const codes = sessionStorage.getItem("codes");
    if(!codes){
        if(to.path !== '/login'){
            next({path: '/login'});
        }else {
            next();
        }
    }else{
        next();
    }
})